package com.jack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jack.model.ProductCategory;
import com.jack.repository.ProductCategoryRepository;
import com.jack.service.CategoryService;

@Repository
public class CategoryServiceImpl implements CategoryService {

	@Autowired
	private ProductCategoryRepository repository;
	
	@Override
	public ProductCategory findOne(int categoryId) {
		return repository.findOne(categoryId);
	}

	@Override
	public List<ProductCategory> findAll() {
		// TODO Auto-generated method stub
		return repository.findAll();
	}

	@Override
	public List<ProductCategory> findByCategoryTypeIn(List<Integer> list) {
		// TODO Auto-generated method stub
		return repository.findByCategoryTypeIn(list);
	}

	@Override
	public ProductCategory save(ProductCategory pc) {
		// TODO Auto-generated method stub
		return repository.save(pc);
	}

}
